//
//  TipView.m
//  地图
//
//  Created by dllo on 16/5/20.
//  Copyright © 2016年 sunzhichao. All rights reserved.
//

#import "TipView.h"

@interface TipView()

@property(nonatomic, strong) UILabel *label;

@end

@implementation TipView

- (instancetype)initWithFrame:(CGRect)frame
{
    if (self = [super initWithFrame:frame])
    {
        self.label = [[UILabel alloc] initWithFrame:self.bounds];
        self.backgroundColor = [[UIColor colorWithHue:0.43 saturation:1.00 brightness:0.57 alpha:1.00] colorWithAlphaComponent:10];
        self.autoresizingMask = UIViewAutoresizingFlexibleTopMargin;
        
        self.label.textAlignment = NSTextAlignmentCenter;
        self.label.autoresizingMask = UIViewAutoresizingFlexibleWidth;
        self.label.textColor = [UIColor whiteColor];
        self.label.text = @"tip";
        self.label.font = [UIFont systemFontOfSize:20];
        
        [self addSubview:self.label];
    }
    return self;
}

- (void)showTip:(NSString *)tip
{
    self.label.text = tip;
}


@end
